package com.hmdp.utils;

import org.omg.CORBA.PUBLIC_MEMBER;

public class RedisConstants {
    // redis 登录部分常量
    public static final String LOGIN_CODE_KEY = "login:code:";  // 验证码存入的 key
    public static final Long LOGIN_CODE_TTL = 2L;  // 验证码有效期
    public static final String LOGIN_USER_KEY = "login:token:";  // 登录信息存入的 key
    public static final Long LOGIN_USER_TTL = 1200L; // 登录信息保留时长 minutes
    public static final Long CACHE_NULL_TTL = 2L;  // 空值的有效期

    // redis 缓存商铺部分常量
    public static final Long CACHE_SHOP_TTL = 30L;  // 缓存有效期
    public static final String CACHE_SHOP_KEY = "cache:shop:";  // 店铺商品缓存的 key
    public static final String CACHE_SHOP_TYPE_LIST = "cache:shoptype";  // 店铺类别缓存 key
    public static final String LOCK_SHOP_KEY = "lock:shop:";  //  用于互斥锁
    public static final Long LOCK_SHOP_TTL = 10L;  //  互斥锁的有效期
    public static final Long LOGICAL_PASS_TTL = 10L; // 逻辑过期时间

    // TODO 优化秒杀业务部分常量
    public static final String SECKILL_STOCK_KEY = "seckill:stock:";

    public static final String BLOG_LIKED_KEY = "blog:liked:";

    public static final String FOLLOW_LIST_KEY = "follows:";
    public static final String FEEDS_ZSET_KEY = "feeds:";

    public static final String SHOP_GEO_KEY = "shop:geo:";

    public static final String USER_SIGN_KEY = "sign:";
}
